package service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.sql.Timestamp;


/**
 * Created by fanzhenyu02 on 2022/6/22.
 */
public class GenerateTargetUrlService {
    public static void main(String[] args) throws Exception {

        Timestamp time = Timestamp.valueOf("2022-07-01 00:00:00");  // 2022-06-01 00:00:00
        long baseStartTime = time.getTime() / 1000;

        String prefix = "https://s3-log.coupang.net/search?from=";
        String postfix = "&query=role%3Aseller_gating_api%20AND%20%20message%3A%22exclude%20keyword%20gating%20result%3Afalse%22";
        int dayCount = 25;

        for (int i = 0; i < dayCount; i++) {
            long curStartTime = baseStartTime + i * 86400, curEndTime = baseStartTime + i * 86400 + 86380;
            System.out.println(prefix + curStartTime + "&to=" + curEndTime + postfix + "\n");
        }
    }

}
